package com.jt.controller;

/**
 * @author :Colin
 * @version 创建时间: 2021/7/26 11:13
 */

import com.jt.pojo.User;

import com.jt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/user/{id}")
    public String getById(@PathVariable Integer id){
        return "Restful动态赋值:"+id;

    }
    @GetMapping("/user/{id}/{name}/{sex}/{age}")
    public User getByUser(User user){
        return user;
        /*restful ajax传参
        * */

    }





}
